Skip to content

fix(policy): reject unknown endpoint security modes - #3187

Open
2000krysztof wants to merge 2 commits into
NVIDIA:mainfrom
2000krysztof:fix/fail-closed-policy-enums
Open

fix(policy): reject unknown endpoint security modes#3187
2000krysztof wants to merge 2 commits into
NVIDIA:mainfrom
2000krysztof:fix/fail-closed-policy-enums

Conversation

@2000krysztof

@2000krysztof 2000krysztof commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Make security-sensitive network policy values fail closed across all policy ingress paths. Replace the public TLS, enforcement, and access strings with typed protobuf enums so invalid values cannot silently weaken enforcement.

Related Issue

Closes #3046

Changes

  • Added shared validation for endpoint TLS, enforcement, and access values.
  • Rejects unknown values with actionable, field-level errors.
  • Applies validation across sandbox policies, policy updates, provider profiles, and merge operations.
  • Prevents malformed enforcement values such as enforc from falling back to audit mode.
  • Added defensive runtime rejection for invalid endpoint modes.
  • Returns gRPC INVALID_ARGUMENT before invalid policies are persisted or activated.
  • Replaced public protobuf strings for TLS, enforcement, and access with typed enums.
  • Updated generated Go bindings and SDK conversions to use the new enum types.
  • Preserved the documented YAML spellings for compatibility.
  • Added regression coverage across policy, provider-profile, gateway, SDK, and runtime paths.
  • Documented accepted values and fail-closed behavior.

Testing

  • mise run pre-commit passes
  • mise run test passes
  • Unit tests added/updated
  • E2E tests added/updated (not applicable)
  • Manually verified sandbox creation and live policy updates using the Podman gateway
  • Confirmed malformed TLS, enforcement, and access values are rejected
  • Confirmed rejected updates do not alter the active policy

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@copy-pr-bot

copy-pr-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@johntmyers
johntmyers marked this pull request as draft September 4, 2026 18:41
@2000krysztof
2000krysztof marked this pull request as ready for review September 7, 2026 11:03
Closes NVIDIA#3046

Validate TLS, enforcement, and access values across policy and provider profile ingress, and prevent runtime parsing from falling back to audit for unknown enforcement values.

Signed-off-by: Krzysztof Malczuk <kmalczuk@redhat.com>
Replace the public TLS, enforcement, and access strings with protobuf enums and carry the typed values through policy composition, provider profiles, drivers, and runtime conversion.

Preserve the documented YAML spellings, reject unknown and invalid numeric enum values consistently, and update generated Go bindings, SDK conversions, tests, and policy documentation.

Signed-off-by: Krzysztof Malczuk <kmalczuk@redhat.com>
@2000krysztof
2000krysztof force-pushed the fix/fail-closed-policy-enums branch from 267b665 to c1c3bdd Compare September 7, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(policy)!: make security-sensitive policy values fail closed

1 participant